﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO.Model;
namespace DAO.Bussiness.Repository
{
    public class PlatoRepository : Repository<Plato>
    {
        public PlatoRepository() : base() { }

        public void Actualizar(Plato e)
        {
            barCafeContext ctx = new barCafeContext();


            ctx.Platos.Remove(ctx.Platos.Where(p => p.Id_Alimento == e.Id_Alimento).First());
            ctx.Platos.Add(e);
            ctx.SaveChanges();

        
        }
    }
}
